package ls.jpa.chapterC.base;

import org.apache.log4j.Logger;

import javax.persistence.PostPersist;
import javax.persistence.PostRemove;
import javax.persistence.PostUpdate;

/**
 * @author Barudisshu
 */
public class LoggingTableListener<T extends AudiTableEntity> {

    public static final Logger logger = Logger.getLogger(LoggingTableListener.class);

    @PostRemove
    @PostUpdate
    @PostPersist
    void postPersist(T t) {
        logger.info(t.getClass() + "has been modify");
    }
}
